/**
 * @Author 韦建韩
 * @Date 2022/3/24
 */
package com.zczn.order_system.entity.dto;

import lombok.Data;

import java.util.List;
import java.util.Map;

@Data
public class ResultDto {
    private Integer code;
    private Object data;
    private List<Object> dataList;
    private Map<Object,Object> dataMap;
    private boolean ok;
    public ResultDto(){
        this.code = 200;
        this.ok = true;
    }
    public void success(){
        this.code = 200;
        this.ok = true;
    }
    public void error(Integer code){
        this.code = code;
        this.ok = false;
    }
    public static ResultDto doCreate(){
        return new ResultDto();
    }
}
